﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.SessionState;
using AntiObesity.Base;

namespace System.Web
{
    public static class WebExtensions
    {
        public static User GetCurrentUser(this HttpSessionState session)
        {
            return session["CurrentUser"] as User;
        }
        public static void SetCurrentUser(this HttpSessionState session, User user)
        {
            session["CurrentUser"] = user;
        }
    }
}
